#  -*- coding:utf-8 -*-
import pickle as pickle
import pprint
# f = open('D:/workspace/python/pythonWorkSpace/ner-lstm/embeddings/wordvec_model_100.pkl','rb')
# data = pickle.load(f,encoding="ASCII")
# pprint.pprint (data)   #show file
def get_pkl1():
    # with open('D:/workspace/python/pythonWorkSpace/ner-lstm/embeddings/train_embed.pkl', 'rb') as f:
    with open('D:/workspace/python/pythonWorkSpace/ner-lstm/embeddings/train_embed.pkl', 'rb') as f:
        data = pickle.load(f)
        pprint.pprint(len(data))  # show file
        for i in range(len(data)):
            pprint.pprint(len(data[i]))
        for i in range(len(data)):
            pprint.pprint(data[i])

def get_pkl2():
    with open('D:/workspace/python/pythonWorkSpace/ner-lstm/embeddings/train_tag.pkl', 'rb') as f:
        data = pickle.load(f)
        pprint.pprint(len(data))  # show file
        for i in range(len(data)):
            pprint.pprint(len(data[i]))
        print('=====================================================================================')
        for i in range(len(data)):
            pprint.pprint(data[i])



if __name__ == '__main__':
    get_pkl2()

